package cqrtplm.mapper;

import com.alibaba.fastjson.JSONObject;
import com.hustcad.plm.pdm.enumeration.model.vo.EnumerationItemHandleVO;
import com.ty.basic.entity.IdentifierEntity;
import com.ty.basic.entity.enumeration.EnumerationDefDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

@Repository
public interface RTEnumMapper {
    IdentifierEntity getEnumItemByDefName(@Param("name") String defName);

    List<EnumerationDefDO> getEnumByDescription(@Param("description") String description);

    void insertEnumDescription(@Param("enumOid") String enumOid, @Param("description") String description,@Param("attributeLinkOid") String attributeLinkOid, @Param("parentEnumOid") String parentEnumOid);

    JSONObject select(@Param("attributeLinkOid") String attributeLinkOid);

    String getEnumGroupOidByName(@Param("name") String name);

    List<JSONObject> selectEnumDisName(@Param("list") List<String> list);

    void delete(@Param("attributeLinkOid") String attributeLinkOid);

    List<JSONObject> selectClassIbaEnum(@Param("list") List<BigInteger> list);

    BigInteger selectEnumGroupId(@Param("key") String key);

    List<String> selectEnumUsageByOid(@Param("oid") String oid);

    List<EnumerationItemHandleVO> batchSelectEnumByEnumId(@Param("list") List<String> list);
}
